package com.gun.config;

import com.alibaba.druid.pool.DruidDataSource;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;


/**
 * @Authar: 吾图南
 * @Data: 2022/12/7 11:49
 * @Package: com.gun.config
 * @ClassName: DataSourceConfig
 * @Description: TODO: 对Druid数据源属性值进行注入
 */
@Configuration
public class DataSourceConfig {


    @Bean
    @ConfigurationProperties(prefix = "spring.datasource")
    public DataSource getDruid(){
        return new DruidDataSource();
    }
}
